<?php

/**
 * This is the model metadata class for table "v_goods_agentable".
 */
class VGoodsAgentableMetadata extends CARMDC
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'v_goods_agentable';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('title', 'required'),
			array('goods_id, related_id', 'numerical', 'integerOnly'=>true),
			array('id', 'length', 'max'=>54),
			array('goods_type, status, agent_status, listing_status, dealer_listing_status', 'length', 'max'=>50),
			array('price_market, price_dealer, price_agent', 'length', 'max'=>10),
			array('provider_id, dealer_id', 'length', 'max'=>20),
			array('title', 'length', 'max'=>100),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, goods_type, goods_id, price_market, price_dealer, price_agent, provider_id, dealer_id, title, status, agent_status, listing_status, related_id, dealer_listing_status, class_id, type_id', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id' => 'ID',
			'goods_type' => 'Goods Type',
			'goods_id' => 'Goods',
			'price_market' => '销售价格',
			'price_dealer' => 'Price Dealer',
			'price_agent' => 'Price Agent',
			'provider_id' => '供应商',
			'dealer_id' => '经销商',
			'title' => 'Title',
			'status' => 'Status',
			'agent_status' => 'Agent Status',
			'listing_status' => 'Listing Status',
			'related_id' => 'Related',
			'dealer_listing_status' => 'Dealer Listing Status',
			'class_id' => 'Class',
			'type_id' => 'Type',
		);
	}
}